<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:70:"C:\wwwroot\vipwaimai.com\web/../application/admin\view\push\index.html";i:1510194742;s:73:"C:\wwwroot\vipwaimai.com\web/../application/admin\view\public\header.html";i:1503189484;s:72:"C:\wwwroot\vipwaimai.com\web/../application/admin\view\public\pages.html";i:1509260822;s:73:"C:\wwwroot\vipwaimai.com\web/../application/admin\view\public\footer.html";i:1512624954;}*/ ?>
﻿<!DOCTYPE html>
<html lang="zh-cn">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="renderer" content="webkit">
		<title><?php echo config('sitename'); ?>-<?php echo lang('label')['Login_title']; ?></title>
		<link rel="stylesheet" type="text/css" href="__ROOT__/static/public/css/pintuer.css" />
		<link rel="stylesheet" type="text/css" href="__ROOT__/static/admin/css/admin.css" />
		<script type="text/javascript" src="__ROOT__/static/public/js/jquery.js"></script>
		<script type="text/javascript" src="__ROOT__/static/public/js/pintuer.js"></script>
		<script type="text/javascript" src="__ROOT__/static/admin/js/admin.js"></script>
		<script type="text/javascript" src="__ROOT__/static/public/layer/layer.js"></script>
		<script type="text/javascript" src="__ROOT__/static/public/laydate/laydate.js"></script>
		<script type="text/javascript" src="__ROOT__/static/public/laytpl/laytpl.js"></script>
	</head>

	<body>
	<style>
		html { overflow-x:hidden; }
	</style>
<div class="tab">
    <div class="tab-head">
        <strong><?php echo lang('push')['send']; ?></strong>
        <ul class="tab-nav">
            <li <?php if($tab==''): ?>class="active"<?php endif; ?>><a href="?tab="><?php echo lang('push')['send']; ?></a></li>
            <li <?php if($tab=='list'): ?>class="active"<?php endif; ?>><a href="?tab=list"><?php echo lang('push')['list']; ?></a></li>
        </ul>
    </div>
    <div class="tab-body">
        <br/>
        <div class="tab-panel <?php if($tab == ''): ?>active<?php endif; ?>" id="tab-send" style="float: left;margin-left: 20px">
            <form method="post" class="form-x" action="">
                <div class="form-group">
                    <div class="label">
                        <label>类型</label>
                    </div>
                    <div class="field">
                        <select name="type" class="input input-auto">
                            <option value="user">用户端</option>
                            <option value="seller">商家端</option>
                            <option value="express">配送端</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label><?php echo lang('push')['content']; ?></label>
                    </div>
                    <div class="field">
                        <textarea name="message" class="input input-auto" style="min-height: 170px;min-width: 400px" data-validate="required:<?php echo lang('currency')['required']; ?>"></textarea>
                    </div>
                </div>
                <div class="form-button">
                    <button class="button bg-main" type="submit">推送</button>
                </div>
            </form>
        </div>
        <div class="tab-panel <?php if($tab == 'list'): ?>active<?php endif; ?>" id="tab-list">
            <form method="post">
                <div class="panel admin-panel">
                    <div class="panel-head"><strong><?php echo lang('push')['list']; ?></strong></div>
                    <table class="table table-hover">
                        <tr>
                            <th width="100">类型</th>
                            <th width="120">内容</th>
                            <th width="200">时间</th>
                        </tr>
                        <?php foreach($list as $volist): ?>
                        <tr>
                            <td style="line-height:40px"><?php if($volist['type'] == 'user'): ?>用户端<?php elseif($volist['type'] == 'seller'): ?>商家端<?php else: ?>配送端<?php endif; ?></td>
                            <td style="line-height:40px"><?php echo $volist['message']; ?></td>
                            <td style="line-height:40px"><?php echo date("Y-m-d H:i:s",$volist['time']); ?></td>
                        </tr>
                        <?php endforeach; ?>
                    </table>
                    <?php if($pages['pagetotal'] > 1): 
	$get_arr = request()->get();
	$parameters = '';
	if(count($get_arr) > 0){
		foreach($get_arr as $k => $v){
			if($k != 'page'){
				$parameters .= '&'.$k.'='.$v;
			}
		}
	}
	 ?>
	<div class="panel-foot text-center">
		<ul class="pagination green">
			<li><a href="#">共<?php echo $pages['total']; ?>条数据</a></li>
		</ul>
		<?php if($pages['page'] > 1): ?>
		<ul class="pagination">
			<li><a href="?page=<?php echo $pages['page']-1; ?><?php echo $parameters; ?>">上一页</a></li>
		</ul>
		<?php endif; ?>
		
		<ul class="pagination pagination-group">
		<?php $__FOR_START_29403__=1;$__FOR_END_29403__=$pages['pagetotal']+1;for($i=$__FOR_START_29403__;$i < $__FOR_END_29403__;$i+=1){ ?>
		<li><a href="?page=<?php echo $i; ?><?php echo $parameters; ?>" <?php if($pages['page']==$i): ?>class="active"<?php endif; ?>><?php echo $i; ?></a></li>
		<?php } ?>
		</ul>
		<?php if($pages['page'] < $pages['pagetotal']): ?>
		<ul class="pagination">
			<li><a href="?page=<?php echo $pages['page']+1; ?><?php echo $parameters; ?>">下一页</a></li>
		</ul>
		<?php endif; ?>
	</div>
<?php endif; ?>

                </div>
            </form>
        </div>
    </div>
</div>
<p class="text-center text-gray" style="margin-top:10px;"><a class="text-gray" target="_blank" href="http://www.wm0530.com">完美外卖系统 Power by 网络工厂</a></p>
</body>
<script>
$('.upload').on('click',function (){
		var id = $(this).attr('data-id');
		 upload(id);
	}
);
function upload(id){
	layer.open({
		type:2,
		title:false,
		area: ['70%', '90%'],
		offset: '5%',
		content: "<?php echo url('/admin/material'); ?>?id="+id
	});
}
</script>
</html>